home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / utils / bibclean / xstddef.h < prev    next >
C/C++ Source or Header  |  1992-10-06  |  2KB  |  73 lines

  1. /* -*-C-*- xstddef.h */
  2. /**********************************************************************/
  3. /****************************** stddef ********************************/
  4. /**********************************************************************/
  5.  
  6. /* $Id: xstddef.h,v 1.5 1992/10/08 01:42:01 beebe Exp beebe $ 
  7.  * $Log: xstddef.h,v $
  8.  * Revision 1.5  1992/10/08  01:42:01  beebe
  9.  * Update for C++.
  10.  *
  11.  * Revision 1.4  1992/07/10  18:07:04  beebe
  12.  * Remove Lattice C support.
  13.  * Change definition of NULL.
  14.  *
  15.  * Revision 1.3  1992/03/06  14:58:06  beebe
  16.  * Complete two-month long development of version 3.0.114.  See
  17.  * 00revhst.txt for details.
  18.  *
  19.  * Revision 1.2  1992/02/29  19:42:20  beebe
  20.  * Update for version 3.0.114 [29-Feb-1992] following two-month
  21.  * major overhaul and compilation testing on numerous machines.
  22.  *
  23.  * Revision 1.2  1992/02/29  19:42:20  beebe
  24.  * Update for version 3.0.114 [29-Feb-1992] following two-month
  25.  * major overhaul and compilation testing on numerous machines.
  26.  *
  27.  */
  28.  
  29. #ifndef XSTDDEF_H_DEFINED_
  30. #define XSTDDEF_H_DEFINED_
  31.  
  32. /***********************************************************************
  33. This file provides some miscellaneous type and constant definitions. It
  34. will include <stddef.h> in a Standard C environment instead.  It is
  35. intended to be included only by os.h.
  36. [14-Dec-1988]
  37. ***********************************************************************/
  38.  
  39. #if    STDC || HAVE_STDDEF_H
  40. #include <stddef.h>        /* get the host version */
  41. #else  /* NOT (STDC || HAVE_STDDEF_H) */
  42.  
  43. #ifndef NULL
  44. #if    KCC_20
  45. /* has its own version in stdio.h */
  46. #else  /* NOT KCC_20 */
  47. #define NULL            ((VOIDP) 0L)
  48. #endif /* KCC_20 */
  49. #endif /* NULL */
  50.  
  51. #ifndef offsetof
  52. #define offsetof(type,ident)    ((size_t)(&((type*) NULL)->ident))
  53. #endif /* offsetof */
  54.  
  55. /* os.h has already included <sys/types.h>, so most systems should
  56. already have size_t defined.  Here is a reasonable value to use if
  57. it is not yet known. */
  58. #if 0
  59. typedef long            size_t;
  60. #endif /* 0 */
  61.  
  62.  
  63. #if    STDC
  64. #else  /* NOT STDC */
  65. typedef long            ptrdiff_t;
  66. #endif /* STDC */
  67.  
  68. extern volatile int        errno;    /* UNIX style error code */
  69.  
  70. #endif /* STDC || HAVE_STDDEF_H */
  71.  
  72. #endif /* XSTDDEF_H_DEFINED_ */
  73.